/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.gxuwz.byssxsys.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.gxuwz.byssxsys.model.*;
import com.gxuwz.byssxsys.dao.*;
import com.gxuwz.byssxsys.service.*;
import com.gxuwz.byssxsys.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


@Entity
@Table(name = "selected_subjects")
public class SelectedSubjects extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SelectedSubjects";
	public static final String ALIAS_ID = "主键";
	public static final String ALIAS_SSNO1 = "选题编号";
	public static final String ALIAS_SSNAME2 = "选题名称";
	public static final String ALIAS_SSREQUIRE3 = "选题要求";
	public static final String ALIAS_SSWORKLOAD4 = "工作量";
	public static final String ALIAS_SSLIMIT_MAJOR5 = "限选专业";
	public static final String ALIAS_SSDIFFICULTY6 = "选题难度";
	public static final String ALIAS_SSREMARK7 = "备注";
	public static final String ALIAS_SSTEACHER8 = "出题教师";
	public static final String ALIAS_SSSET_DATA9 = "出题日期";
	
	//date formats
	public static final String FORMAT_SSSET_DATA9 = DATE_FORMAT;
	

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * 主键       db_column: id 
     */ 	
	
	private java.lang.Integer id;
    /**
     * 选题编号       db_column: s_s_no1 
     */ 	
	@Length(max=50)
	private java.lang.String ssno1;
    /**
     * 选题名称       db_column: s_s_name2 
     */ 	
	@Length(max=200)
	private java.lang.String ssname2;
    /**
     * 选题要求       db_column: s_s_require3 
     */ 	
	@Length(max=500)
	private java.lang.String ssrequire3;
    /**
     * 工作量       db_column: s_s_workload4 
     */ 	
	@Length(max=200)
	private java.lang.String ssworkload4;
    /**
     * 限选专业       db_column: s_s_limit_major5 
     */ 	
	@Length(max=100)
	private java.lang.String sslimitMajor5;
    /**
     * 选题难度       db_column: s_s_difficulty6 
     */ 	
	@Length(max=50)
	private java.lang.String ssdifficulty6;
    /**
     * 备注       db_column: s_s_remark7 
     */ 	
	@Length(max=500)
	private java.lang.String ssremark7;
    /**
     * 出题教师       db_column: s_s_teacher8 
     */ 	
	@Length(max=50)
	private java.lang.String ssteacher8;
    /**
     * 出题日期       db_column: s_s_set_data9 
     */ 	
	
	private java.util.Date sssetData9;
	//columns END


	public SelectedSubjects(){
	}

	public SelectedSubjects(
		java.lang.Integer id
	){
		this.id = id;
	}

	

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "increment")
	@Column(name = "id", unique = true, nullable = false, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getId() {
		return this.id;
	}
	
	@Column(name = "s_s_no1", unique = true, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getSsno1() {
		return this.ssno1;
	}
	
	public void setSsno1(java.lang.String value) {
		this.ssno1 = value;
	}
	
	@Column(name = "s_s_name2", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getSsname2() {
		return this.ssname2;
	}
	
	public void setSsname2(java.lang.String value) {
		this.ssname2 = value;
	}
	
	@Column(name = "s_s_require3", unique = false, nullable = true, insertable = true, updatable = true, length = 500)
	public java.lang.String getSsrequire3() {
		return this.ssrequire3;
	}
	
	public void setSsrequire3(java.lang.String value) {
		this.ssrequire3 = value;
	}
	
	@Column(name = "s_s_workload4", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getSsworkload4() {
		return this.ssworkload4;
	}
	
	public void setSsworkload4(java.lang.String value) {
		this.ssworkload4 = value;
	}
	
	@Column(name = "s_s_limit_major5", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
	public java.lang.String getSslimitMajor5() {
		return this.sslimitMajor5;
	}
	
	public void setSslimitMajor5(java.lang.String value) {
		this.sslimitMajor5 = value;
	}
	
	@Column(name = "s_s_difficulty6", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getSsdifficulty6() {
		return this.ssdifficulty6;
	}
	
	public void setSsdifficulty6(java.lang.String value) {
		this.ssdifficulty6 = value;
	}
	
	@Column(name = "s_s_remark7", unique = false, nullable = true, insertable = true, updatable = true, length = 500)
	public java.lang.String getSsremark7() {
		return this.ssremark7;
	}
	
	public void setSsremark7(java.lang.String value) {
		this.ssremark7 = value;
	}
	
	@Column(name = "s_s_teacher8", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getSsteacher8() {
		return this.ssteacher8;
	}
	
	public void setSsteacher8(java.lang.String value) {
		this.ssteacher8 = value;
	}
	
	@Transient
	public String getSssetData9String() {
		return DateConvertUtils.format(getSssetData9(), FORMAT_SSSET_DATA9);
	}
	public void setSssetData9String(String value) {
		setSssetData9(DateConvertUtils.parse(value, FORMAT_SSSET_DATA9,java.util.Date.class));
	}
	
	@Column(name = "s_s_set_data9", unique = false, nullable = true, insertable = true, updatable = true, length = 0)
	public java.util.Date getSssetData9() {
		return this.sssetData9;
	}
	
	public void setSssetData9(java.util.Date value) {
		this.sssetData9 = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Ssno1",getSsno1())
			.append("Ssname2",getSsname2())
			.append("Ssrequire3",getSsrequire3())
			.append("Ssworkload4",getSsworkload4())
			.append("SslimitMajor5",getSslimitMajor5())
			.append("Ssdifficulty6",getSsdifficulty6())
			.append("Ssremark7",getSsremark7())
			.append("Ssteacher8",getSsteacher8())
			.append("SssetData9",getSssetData9())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SelectedSubjects == false) return false;
		if(this == obj) return true;
		SelectedSubjects other = (SelectedSubjects)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

